import VueRouter from 'vue-router'
//导入对应的路由组件
import Main from "@/views/Main.vue";
import Json from "@/views/Json.vue"

const router=new VueRouter({
    routes:[
        {
            path:'/',
            component: Main,
            meta:{
                // 页面标题title
                title: 'atf质量效率平台'
            }
        },
        {
            path:'/json',
            component: Json,
            meta:{
                // 页面标题title
                title: '我的页面'
            }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
})


// 注册导航守卫(回调函数)
export default router
